<template>
	<view class="invitation-code">
		<wx-share-dialog ref="wxShareDialog"></wx-share-dialog>
	</view>
</template>

<script>
	import wxShareDialog from '@/components/wxShareDialog.vue';
	export default {
		data() {
			return {}
		},
		components: {
			wxShareDialog
		},
		onShareAppMessage(res) {
			if (res.from === 'button') { // 来自页面内分享按钮
				console.log(res.target)
			}
			return {
				title: 'sccc分享标题' + this.nickname,
				path: '/pages/test/test?id=123'
			}
		},
		onShareTimeline(res) {
			return {
				title: '分享朋友圈',
				path: '/pages/test/test?id=123'
			}
		},
		onLoad(query) {
			this.$refs.wxShareDialog.open();
		},
		onShow() {},
		mounted() {},
		methods: {
			// test2() {
			// 	uni.showShareMenu({
			// 		withShareTicket: true,
			// 		menus: ['shareTimeline']
			// 	})
			// },
			// test() {
			// 	uni.showShareMenu({
			// 		withShareTicket: true,
			// 		menus: ['shareAppMessage']
			// 	})
			// },
		}
	}
</script>

<style lang="scss">

</style>